using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EasterEggClass : MonoBehaviour
{
    public GameObject eggShowGameObject;

    public Unit_Item_Ctrl magnifyingGlass;

    void Start(){
        eggShowGameObject.SetActive(false);
    }

    void OnTriggerEnter2D(Collider2D other){
        Unit_Charactor_Ctrl unit_Charactor_Ctrl = other.gameObject.GetComponentInParent<Unit_Charactor_Ctrl>();
        if(unit_Charactor_Ctrl != null && unit_Charactor_Ctrl.ownItems.Contains(magnifyingGlass)){
            eggShowGameObject.SetActive(true);
            IEPool_Manager.instance.WaitTimeToDo("", 2f, null, () => {
                eggShowGameObject.SetActive(false);
            });
        }
    }
}
